package express.compiler;

import com.google.common.collect.Lists;
import lombok.Data;

import java.util.List;

@Data
public class SyntaxNode {
    private List<SyntaxNode> childNodes = Lists.newArrayList();

    private String value;
    private SyntaxNodeType type;


    public SyntaxNode(SyntaxNodeType type) {
        this.type = type;
    }

    public SyntaxNode(SyntaxNodeType type, String value) {
        this.type = type;
        this.value = value;
    }



    public void addChild(SyntaxNode node) {
        childNodes.add(node);
    }
}
